package com.demo.adapter.objectAdapter;


public class VoltageAdapter implements IVoltage5V {

    private Voltage220V voltage220V;

    public VoltageAdapter(Voltage220V voltage220V) {
        this.voltage220V = voltage220V;
    }

    @Override
    public int outPut5V() {
        if (voltage220V != null) {
            int srcV = voltage220V.outPut220V();
            int dstV = srcV / 44;
            return dstV;
        }
        return 0;
    }
}
